<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/permutations.h File Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">permutations.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Permutations over Hypercubes and their slices.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="_p_algebra_8h_source.html">helib/PAlgebra.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="matching_8h_source.html">helib/matching.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="hypercube_8h_source.html">helib/hypercube.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="api_attributes_8h_source.html">helib/apiAttributes.h</a>&gt;</code><br />
</div>
<p><a href="permutations_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_col_perm.html">helib::ColPerm</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Permuting a single dimension (column) of a hypercube.  <a href="classhelib_1_1_col_perm.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_general_benes_network.html">helib::GeneralBenesNetwork</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implementation of generalized Benes Permutation Network.  <a href="classhelib_1_1_general_benes_network.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_full_binary_tree.html">helib::FullBinaryTree</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple implementation of full binary trees (each non-leaf has 2 children)  <a href="classhelib_1_1_full_binary_tree.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_tree_node.html">helib::TreeNode&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A node in a full binary tree.  <a href="classhelib_1_1_tree_node.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_full_binary_tree.html">helib::FullBinaryTree</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple implementation of full binary trees (each non-leaf has 2 children)  <a href="classhelib_1_1_full_binary_tree.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_gen_descriptor.html">helib::GenDescriptor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A minimal description of a generator for the purpose of building tree.  <a href="classhelib_1_1_gen_descriptor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sub_dimension.html">helib::SubDimension</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A node in a tree relative to some generator.  <a href="classhelib_1_1_sub_dimension.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_generator_trees.html">helib::GeneratorTrees</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A std::vector of generator trees, one per generator in Zm*&zwj;/(p)  <a href="classhelib_1_1_generator_trees.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_net_layer.html">helib::PermNetLayer</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The information needed to apply one layer of a permutation network.  <a href="classhelib_1_1_perm_net_layer.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html">helib::PermNetwork</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A full permutation network.  <a href="classhelib_1_1_perm_network.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacehelib"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html">helib</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ae0769a209e14d5e1bfd8579072397867"><td class="memItemLeft" align="right" valign="top">typedef NTL::Vec&lt; long &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#ae0769a209e14d5e1bfd8579072397867">helib::Permut</a></td></tr>
<tr class="memdesc:ae0769a209e14d5e1bfd8579072397867"><td class="mdescLeft">&#160;</td><td class="mdescRight">A simple permutation is just a vector with p[i]=\pi_i.  <a href="namespacehelib.html#ae0769a209e14d5e1bfd8579072397867">More...</a><br /></td></tr>
<tr class="separator:ae0769a209e14d5e1bfd8579072397867"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22b83b7df1af539c07c804d7888448ce"><td class="memItemLeft" align="right" valign="top">typedef FullBinaryTree&lt; SubDimension &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a22b83b7df1af539c07c804d7888448ce">helib::OneGeneratorTree</a></td></tr>
<tr class="separator:a22b83b7df1af539c07c804d7888448ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0cf8627539f6c1c46e6ae9287058f7cc"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a0cf8627539f6c1c46e6ae9287058f7cc"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a0cf8627539f6c1c46e6ae9287058f7cc">helib::applyPermToVec</a> (NTL::Vec&lt; T &gt; &amp;out, const NTL::Vec&lt; T &gt; &amp;in, const Permut &amp;p1)</td></tr>
<tr class="memdesc:a0cf8627539f6c1c46e6ae9287058f7cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a permutation to a std::vector, out[i]=in[p1[i]] (NOT in-place)  <a href="namespacehelib.html#a0cf8627539f6c1c46e6ae9287058f7cc">More...</a><br /></td></tr>
<tr class="separator:a0cf8627539f6c1c46e6ae9287058f7cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abae99af99454c783bed9cbde7cd72058"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:abae99af99454c783bed9cbde7cd72058"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacehelib.html#abae99af99454c783bed9cbde7cd72058">helib::applyPermToVec</a> (std::vector&lt; T &gt; &amp;out, const std::vector&lt; T &gt; &amp;in, const Permut &amp;p1)</td></tr>
<tr class="separator:abae99af99454c783bed9cbde7cd72058"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ae17bbc28a578112d0fe28b99f5e204"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a0ae17bbc28a578112d0fe28b99f5e204"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a0ae17bbc28a578112d0fe28b99f5e204">helib::applyPermsToVec</a> (NTL::Vec&lt; T &gt; &amp;out, const NTL::Vec&lt; T &gt; &amp;in, const Permut &amp;p2, const Permut &amp;p1)</td></tr>
<tr class="memdesc:a0ae17bbc28a578112d0fe28b99f5e204"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply two permutations to a std::vector out[i]=in[p2[p1[i]]] (NOT in-place)  <a href="namespacehelib.html#a0ae17bbc28a578112d0fe28b99f5e204">More...</a><br /></td></tr>
<tr class="separator:a0ae17bbc28a578112d0fe28b99f5e204"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c6d61d4ac69597feb9beedc26bf93cc"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a6c6d61d4ac69597feb9beedc26bf93cc"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a6c6d61d4ac69597feb9beedc26bf93cc">helib::applyPermsToVec</a> (std::vector&lt; T &gt; &amp;out, const std::vector&lt; T &gt; &amp;in, const Permut &amp;p2, const Permut &amp;p1)</td></tr>
<tr class="separator:a6c6d61d4ac69597feb9beedc26bf93cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa74c29f86e466570325f829fe4ea74b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#aa74c29f86e466570325f829fe4ea74b0">helib::randomPerm</a> (Permut &amp;perm, long n)</td></tr>
<tr class="memdesc:aa74c29f86e466570325f829fe4ea74b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">A random size-n permutation.  <a href="namespacehelib.html#aa74c29f86e466570325f829fe4ea74b0">More...</a><br /></td></tr>
<tr class="separator:aa74c29f86e466570325f829fe4ea74b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6b38e2bdf2734a792b5f11fe5f293be"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#ac6b38e2bdf2734a792b5f11fe5f293be">helib::operator&lt;&lt;</a> (std::ostream &amp;s, const ColPerm &amp;p)</td></tr>
<tr class="separator:ac6b38e2bdf2734a792b5f11fe5f293be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11554e25622d14682edfa2be22ed6df6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehelib.html#a11554e25622d14682edfa2be22ed6df6">helib::breakPermByDim</a> (std::vector&lt; ColPerm &gt; &amp;out, const Permut &amp;pi, const CubeSignature &amp;sig)</td></tr>
<tr class="memdesc:a11554e25622d14682edfa2be22ed6df6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Takes a permutation pi over m-dimensional cube C=Z_{n1} x...x Z_{nm} and expresses pi as a product pi = rho_{2m-1} o ... o rho_2 o rho_1 where each rho_i is a column permutation along one dimension. Specifically for i&lt;m, the permutations rho_i and rho_{2(m-1)-i} permute the i'th dimension.  <a href="namespacehelib.html#a11554e25622d14682edfa2be22ed6df6">More...</a><br /></td></tr>
<tr class="separator:a11554e25622d14682edfa2be22ed6df6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Permutations over Hypercubes and their slices. </p>
</div></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
